package com.sample.Tetris;

import android.graphics.Color;

public class IShape extends Shape {
int[] tempCoords=new int[8];
public IShape(){
color=Color.CYAN;	
coords[0]=5;
coords[1]=0;
coords[2]=5;
coords[3]=1;
coords[4]=5;
coords[5]=2;
coords[6]=5;
coords[7]=3;
}
public int[] turn(int direction){
state++;
if (state==2){	
tempCoords[0]=coords[0]-2;	
tempCoords[1]=coords[1]+1;
tempCoords[2]=coords[2]-1;
tempCoords[3]=coords[3];
tempCoords[4]=coords[4];
tempCoords[5]=coords[5]-1;
tempCoords[6]=coords[6]+1;
tempCoords[7]=coords[7]-2;
}
if (state==3){
state=1;	
tempCoords[0]=coords[0]+2;	
tempCoords[1]=coords[1]-1;
tempCoords[2]=coords[2]+1;
tempCoords[3]=coords[3];
tempCoords[4]=coords[4];
tempCoords[5]=coords[5]+1;
tempCoords[6]=coords[6]-1;
tempCoords[7]=coords[7]+2;
}
return tempCoords;	
}
}
